<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <router-link to='/gohome'>gohome</router-link><br>
    <router-link to='/gotoparams/398/哈哈就是这标题'>gotoparamspage</router-link>
    <button @click="gohome">回到首页</button>
    <button @click="gotohi1">goto hi1</button>
  </div>
  
</template>

<script>
export default {
  name: 'Error',
  data () {
    return {
      msg: 'Error page 404.'
    }
  },
  methods:{
    gohome(){
      this.$router.push('/');
    },
    gotohi1(){
      this.$router.push('/hi/hi1');
      console.log(Math.random()*100);
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
